#include<stdio.h>
int main()
{
	void fun();
	for (int i = 0; i < 3; i++)
		fun();

//    printf("static_i = %d\n", static_i);  //不能在fun()函数之外调用
	return 0;
}
void fun()
{
	int i = 0;
	static int static_i = 0; 
    //该变量在fun()函数中相当于是一个全局变量，但只初始化一次
	printf("i = %d\n", i);
	printf("static_i = %d\n", static_i);
	i++;
	static_i++;
}


